#all: libicd_policy_add.so libicd_policy_one.so
all: libicd_policy_log.so

policy_log.o: policy_log.c
	gcc -fpic -fPIC -O2 `pkg-config --cflags glib-2.0 gconf-2.0` -I /usr/include/icd/ -o $@ -c $<

#policy_add.o: policy_add.c
#	gcc -fpic -fPIC -O2 `pkg-config --cflags glib-2.0 gconf-2.0` -I /usr/include/icd/ -o $@ -c $<

#policy_one.o: policy_one.c
#	gcc -fpic -fPIC -O2 `pkg-config --cflags glib-2.0 gconf-2.0` -I /usr/include/icd/ -o $@ -c $<

libicd_policy_log.so: policy_log.o
	gcc -shared -Wl,-soname,$@ -o $@ $<
	strip --remove-section=.comment --remove-section=.note --strip-unneeded $@

#libicd_policy_add.so: policy_add.o
#	gcc -shared -Wl,-soname,$@ -o $@ $<
#	strip --remove-section=.comment --remove-section=.note --strip-unneeded $@

#libicd_policy_one.so: policy_one.o
#	gcc -shared -Wl,-soname,$@ -o $@ $<
#	strip --remove-section=.comment --remove-section=.note --strip-unneeded $@

distclean:
	rm -f *~ *.o *.so
